import request from "@/utils/request";
// 菜单基础URL

const DriverApi = {
  /**
   *
   * @returns 司机列表
   */
  getList(queryParams: any) {
    return request<any>({
      url: "driverInfo/list",
      method: "get",
      params: queryParams,
    });
  },
  //司机钱包
  getDriverWallet(queryParams: any) {
    return request<any>({
      url: "wallet/driverList",
      method: "get",
      params: queryParams,
    });
  },
  //司机流水
  getDriverRecords(queryParams: any) {
    return request<any>({
      url: "wallet/records",
      method: "get",
      params: queryParams,
    });
  },
  //司机编辑
  driverEdit(data: any) {
    return request<any>({
      url: "driverInfo/edit",
      method: "post",
      data: data,
    });
  },
  //司机钱包编辑
  driverWalletEdit(data: any) {
    return request<any>({
      url: "wallet/updateUserWallet",
      method: "post",
      data: data,
    });
  },
  //司机奖惩
  driverReward(data: any) {
    return request<any>({
      url: "wallet/reward",
      method: "post",
      data: data,
    });
  },
  //司机提现列表
  getDriverWithRecords(params: any) {
    return request<any>({
      url: "wallet/withdraw/records",
      method: "get",
      params: params,
    });
  },
  //司机提现审核
  driverConfirmAudit(data: any) {
    return request<any>({
      url: "wallet/withdraw/approval",
      method: "post",
      data: data,
    });
  },
  //司机排名配置列表
  getDriverRank(params: any) {
    return request<any>({
      url: "driverRank/list",
      method: "get",
      params: params,
    });
  },
  //排名配置编辑
  driverRankEdit(data: any) {
    return request<any>({
      url: "driverRank/addOrEdit",
      method: "post",
      data: data,
    });
  },
};

export default DriverApi;
